// pages/message/message.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info:{sys:0,fw:0}
  },

  onShow: function() {
    this.load();
  },

  async load(){
    let res=await wx.util.post("msg/index",{utype:1});
    this.setData({info:res.data});
  },
  toMsg(e) {
    let type=e.currentTarget.dataset.type;
    wx.util.href('/pages/msgdetail/msgdetail?type='+type,true);
  },
  setSms(){
    wx.openSetting({
      success (res) {
        console.log(res.authSetting)
      }
    })
  }
})